#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

#define NOISY_TEST 1

void checkFullDeckCount(struct gameState *pre) {
  struct gameState post;
  int test;
  memcpy (&post, pre, sizeof(struct gameState));
  test = fullDeckCount(0, 0, &post);
  printf("expected: %d, actual: %d\n", 10, test);
  assert(test == 10);
  post.handCount[1] = 5;
  post.deckCount[1] = 5;
  post.discardCount[1] = 5;
  test = fullDeckCount(1, 0, &post);
  printf("expected: %d, actual: %d\n", 15, test);
  assert(test == 15);
  post.handCount[2] = 5;
  post.deckCount[2] = 5;
  post.discardCount[2] = 15;
  test = fullDeckCount(2, 0, &post);
  printf("expected: %d, actual: %d\n", 25, test);
  assert(test == 25);
  post.handCount[3] = 5;
  post.deckCount[3] = 0;
  post.discardCount[3] = 15;
  test = fullDeckCount(3, 0, &post);
  printf("expected: %d, actual: %d\n", 20, test);
  assert(test == 20);
}

int run_tests8 () {
  int k[10] = {adventurer, council_room, feast, gardens, mine,
	       remodel, smithy, village, baron, great_hall};
  struct gameState G;
  printf ("FIXED TESTING fullDeckCount.\n");
  initializeGame(4, k, 1, &G);
  checkFullDeckCount(&G);
  printf ("ALL TESTS OK\n");
  return 0;
}
